/*
 * Copyright 2010 Okan Kahraman
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package tr.org.tx.vmot.ui;

import tr.org.tx.vmot.ui.base.AbstractView;
import tr.org.tx.vmot.ui.calendar.VmotCalendar;
import tr.org.tx.vmot.ui.calendar.VmotCalendarNavigator;

import com.vaadin.ui.Alignment;
import com.vaadin.ui.VerticalLayout;

/**
 * @author Okan Kahraman
 *
 */
public class MainView extends AbstractView {

	private static final long serialVersionUID = -1213240057794172985L;
	
	private final VerticalLayout layout = new VerticalLayout();
	
	private VmotCalendar vmotCalendar = new VmotCalendar();
	
	private VmotCalendarNavigator vmotCalendarNavigator = new VmotCalendarNavigator(vmotCalendar);
	
	public MainView() {
		constructView();
	}

	private void constructView() {
		layout.setSpacing(true);
	    layout.setMargin(true);
	    layout.setSizeFull();
	    layout.setStyleName("calendar");
		layout.addComponent(vmotCalendarNavigator);
		layout.setComponentAlignment(vmotCalendarNavigator, Alignment.BOTTOM_CENTER);
		layout.addComponent(vmotCalendar);
		layout.setComponentAlignment(vmotCalendar, Alignment.TOP_CENTER);
		setCompositionRoot(layout);
	}

	
	
}
